/*
 * Date：10/23/18 10:15 PM
 * Author: guomw
 *
 */

package org.elanfox.intellicommunity.biz.service.core.equipment;


import org.elanfox.intellicommunity.biz.dto.equipment.LocatorSaveDTO;
import org.elanfox.intellicommunity.biz.entity.equipment.LocatorPO;
import org.elanfox.intellicommunity.biz.vo.LocatorVO;
import org.elanfox.intellicommunity.data.base.base.SearchableCrudService;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * 定位器service
 *
 * @author loutianix
 * @date 2019-12-09
 */
public interface LocatorService extends SearchableCrudService<LocatorPO, Integer> {

    /**
     * 修改启用状态
     *
     * @param locationId
     * @return
     */
    boolean updateEnable(Integer locationId);

    /**
     * 修改启用状态
     *
     * @param no
     * @return
     */
    boolean updateEnable(Long no);

    /**
     * 物理删除定位器
     *
     * @param no
     * @return
     */
    boolean deleteByNo(Long no);

    /**
     * 更新防拆卸状态
     *
     * @param locationId
     * @return
     */
    boolean updateDismantleStatus(Integer locationId);

    /**
     * 根据社区id获取监控
     *
     * @param structureId
     * @return
     */
    List<LocatorPO> findByStructureId(Integer structureId);

    LocatorPO findByNo(Long no);

    LocatorVO updateLocation(LocatorSaveDTO dto);

    List<LocatorVO> findEquipment();

    List<LocatorVO> findLocatorVoByStrId(Integer structureId, Boolean show);

    boolean updateShow(Integer locationId);

    void lead(MultipartFile updateFile) throws IOException;

    long count(Long no);

    List<LocatorPO> findPStructureLocator(Integer structureId);

    void addToArea(Integer areaId, String... idArray);

    List<LocatorPO> findByArea(Integer areaId);
}
